package com.hw.ble_lib;

/**
 * 棋子移动数据
 */
public class ChessMove {
    public final int fromX;      // 起始X坐标 (0~7)
    public final int fromY;      // 起始Y坐标 (0~7)
    public final int toX;        // 目标X坐标 (0~7)
    public final int toY;        // 目标Y坐标 (0~7)
    public final int pieceId;    // 棋子ID (1~32)
    
    public ChessMove(int fromX, int fromY, int toX, int toY, int pieceId) {
        this.fromX = fromX;
        this.fromY = fromY;
        this.toX = toX;
        this.toY = toY;
        this.pieceId = pieceId;
    }
    
    @Override
    public String toString() {
        return String.format("棋子 #%d: (%d,%d) → (%d,%d)", 
            pieceId, fromX, fromY, toX, toY);
    }
}
